Modern general-purpose super scalar processors, often include: (i) a main processor; and (ii) special co-processors, which are used to off-load some computation intensive work. The co-processor performs specialized functions, independent of the main processor. Typical examples of special functions are high-end graphics processing, encryption/decryption and compression/decompression. Co-processors can be attached to a main processor in many different ways, such as: (i) attaching them to processor interconnect bus; (ii) by placing them in industry standard IO (input/output) bus slots (for example, PCIe (Peripheral Component Interconnect Express) IO slot); and/or (iii) by connecting them to main processor using any other custom bus.
Generally, co-processors rely on the main processor for work assignments. These work assignments come in the form of a request sent from the main processor, and use a co-processor command block in the main memory. The work assignment initiates and directs the co-processor to take a specific action. The co-processor reads all the inputs from the co-processor command block and performs the requested operation. An example of a command will be where the user wants to encrypt a certain amount of plain text using an encryption key and would request the co-processor to carry out the encryption task. The plain text and the encryption key can be passed as inputs to the co-processor while co-processor would produce encrypted text as output. The main processor, in the meantime, can continue to process other tasks. The main processor can program the co-processor to be effectively notified of the completion status of work assigned in one of two possible ways: (i) when the co-processor has finished the requested work, it raises an interrupt to signal completion of the required operation; or (ii) the main processor polls the co-processors for status of work. In either case, the main processor, on receiving the completion status, reads the output and assigns more work to the co-processor.
In current methods of issuing processor commands, there is no maximum time limit given for the co-processor to finish assigned work. In order for the main processor to know the co-processor command execution status, the main processor can either poll the status of the co-processor command or process the co-processor interrupt. If the co-processor command is slow to complete, the main processor has no way to know if the co-processor is just taking additional time to complete the work assigned, or if the co-processor operation is not performing the required task, which is a condition that those of skill in the art refer to as “hung”.